FROM java:8u60

# Last modified at 2015-11-12
MAINTAINER gavincook <swbyzx@gmail.com>

ENV CATALINA_HOME /usr/local/program/tomcat
ENV TOMCAT_MAJOR_VERSION 8
ENV TOMCAT_VERSION 8.0.23

RUN chmod +x /scripts/start

RUN
  DEBIAN_FRONTEND=noninteractive apt-get install -y wget &&\
  wget http://archive.apache.org/dist/tomcat/tomcat-$TOMCAT_MAJOR_VERSION/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.tar.gz &&\
  tar -xvf apache-tomcat*.tar.gz &&\
  rm apache-tomcat*.tar.gz &&\
  mkdir -p /usr/local/program &&\
  mv apache-tomcat* /usr/local/program/tomcat

VOLUME ["/usr/local/program/tomcat/logs"]

EXPOSE 8080 443

CMD ["/scripts/start"]
